<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Version</title>
			<link rel="stylesheet" href="../../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Interface Version</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">A <a href="../../phpContentRepository/Level2/Version.html">Version</a> object wraps an nt:version <a href="../../phpContentRepository/Node.html">Node</a>.</p>
<p class="description"><p>It provides convenient access to version information.</p></p>
	<ul class="tags">
				<li><span class="field">copyright:</span> Copyright &amp;copy; 2004-2005, Domain51</li>
				<li><span class="field">author:</span> PHP - Travis Swicegood &lt;<a href="mailto:travis@domain51.net">travis@domain51.net</a>&gt;</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_version_Version_interface_php.html">/version/Version.interface.php</a> (line <span class="field">37</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#addSuccessor" title="details" class="method-name">addSuccessor</a>
											(<span class="var-type">Version</span>&nbsp;<span class="var-name">$v</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#addVersionLabel" title="details" class="method-name">addVersionLabel</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$label</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#getPredecessors" title="details" class="method-name">getPredecessors</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#getSuccessors" title="details" class="method-name">getSuccessors</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getVersionDate" title="details" class="method-name">getVersionDate</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getVersionLabels" title="details" class="method-name">getVersionLabels</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getVersionName" title="details" class="method-name">getVersionName</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#removeSuccessor" title="details" class="method-name">removeSuccessor</a>
											(<span class="var-type">Version</span>&nbsp;<span class="var-name">$v</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#removeVersionLabel" title="details" class="method-name">removeVersionLabel</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$label</span>)
									</div>
							</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodaddSuccessor" id="addSuccessor"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">addSuccessor</span> (line <span class="line-number">183</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Adds the specified $v as a successor of this version.</p>
<p class="description"><p>This is used to create a &quot;merge&quot; within the version graph (not to be  confused with the <a href="../../phpContentRepository/Node.html#methodmerge">Node::merge()</a> method which operates on  <a href="../../phpContentRepository/Workspace.html">Workspace</a> <a href="../../phpContentRepository/Node.html">Node</a>s). A <a href="../../phpContentRepository/Workspace.html">Workspace</a>  <a href="../../phpContentRepository/Node.html#methodmerge">Node::merge()</a> may be used to produce the appropriate <a href="../../phpContentRepository/Node.html">Node</a>  to be checked-in and then added as a successor to more than one existing  version, using this <a href="../../phpContentRepository/Level2/Version.html#methodaddSuccessor">addSuccessor()</a> method, thus performing both  the semantic and the version graph parts of the full &quot;merge&quot; operation.</p><p>This method corresponds to adding a reference to an  nt:version <a href="../../phpContentRepository/Node.html">Node</a> to the jcr:successors  multi-value <a href="../../phpContentRepository/Property.html">Property</a> of the nt:version <a href="../../phpContentRepository/Node.html">Node</a>  that represents this version.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
				<li><span class="field">throws:</span> <a href="../../phpContentRepository/Exceptions/VersionException.html">VersionException</a>    If $v is not already in the same version history as this    <a href="../../phpContentRepository/Node.html">Node</a> or if adding $v as  a successor would create    a cycle in the version history.</li>
				<li><span class="field">throws:</span> <a href="../../phpContentRepository/Exceptions/RepositoryException.html">RepositoryException</a>    If any other error occurs.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			addSuccessor
		</span>
					(<span class="var-type">Version</span>&nbsp;<span class="var-name">$v</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">object
 A</span>
				<span class="var-name">$v</span><span class="var-description">: <a href="../../phpContentRepository/Level2/Version.html">Version</a> object.</span>			</li>
				</ul>
		
		
	</div>
<a name="methodaddVersionLabel" id="addVersionLabel"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">addVersionLabel</span> (line <span class="line-number">107</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Adds a version label to this version.</p>
<p class="description"><p>This corresponds to the values of the jcr:versionLabels  multi-value <a href="../../phpContentRepository/Property.html">Property</a> in the nt:version <a href="../../phpContentRepository/Node.html">Node</a>  that represents this version.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
				<li><span class="field">throws:</span> <a href="../../phpContentRepository/Exceptions/RepositoryException.html">RepositoryException</a>    If an error occurs.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			addVersionLabel
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$label</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$label</span><span class="var-description">: A version label</span>			</li>
				</ul>
		
		
	</div>
<a name="methodgetPredecessors" id="getPredecessors"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getPredecessors</span> (line <span class="line-number">154</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the predecessor versions of this version.</p>
<p class="description"><p>This corresponds to returning all the nt:version  <a href="../../phpContentRepository/Node.html">Node</a>s whose jcr:successors <a href="../../phpContentRepository/Property.html">Property</a> includes  a reference to the nt:version <a href="../../phpContentRepository/Node.html">Node</a> that represents  this version.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> A <a href="../../phpContentRepository/Level2/Version.html">Version</a> array.</li>
				<li><span class="field">access:</span> public</li>
				<li><span class="field">throws:</span> <a href="../../phpContentRepository/Exceptions/RepositoryException.html">RepositoryException</a>    If an error occurs.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			getPredecessors
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodgetSuccessors" id="getSuccessors"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getSuccessors</span> (line <span class="line-number">138</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the successor versions of this version.</p>
<p class="description"><p>This corresponds to returning all the nt:version  <a href="../../phpContentRepository/Node.html">Node</a>s referenced by the jcr:successors multi-value  <a href="../../phpContentRepository/Property.html">Property</a> in the nt:version <a href="../../phpContentRepository/Node.html">Node</a> that  represents this version.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> A <a href="../../phpContentRepository/Level2/Version.html">Version</a> array.</li>
				<li><span class="field">access:</span> public</li>
				<li><span class="field">throws:</span> <a href="../../phpContentRepository/Exceptions/RepositoryException.html">RepositoryException</a>    If an error occurs.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			getSuccessors
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodgetVersionDate" id="getVersionDate"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getVersionDate</span> (line <span class="line-number">76</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the version date of this version.</p>
<p class="description"><p>This corresponds to the value of the jcr:versionDate  <a href="../../phpContentRepository/Property.html">Property</a> in the nt:version <a href="../../phpContentRepository/Node.html">Node</a> that  represents this version.</p><p><strong>PHP Note</strong>: As PHP does not offer a Calendar class as a core part  of its distribution, this can be returned as a string.  It must be  formatted according to the  <a href="http://www.w3.org/TR/NOTE-datetime">ISO8601 specifications</a>.  At  some future point, phpCR may offer a simple Calendar object to encapsulate  this return on.</p><p>If you choose to implement your own Calendar object, the object should  contain a method toString() which should return a properly formatted  ISO8601 date/time.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> An ISO8601 date/time of when this was last updated.</li>
				<li><span class="field">access:</span> public</li>
				<li><span class="field">throws:</span> <a href="../../phpContentRepository/Exceptions/RepositoryException.html">RepositoryException</a>    If an error occurs.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getVersionDate
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodgetVersionLabels" id="getVersionLabels"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getVersionLabels</span> (line <span class="line-number">91</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the version labels of this version.</p>
<p class="description"><p>This corresponds to the values of the jcr:versionName  <a href="../../phpContentRepository/Property.html">Property</a> in the nt:version <a href="../../phpContentRepository/Node.html">Node</a> that  represents this version.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
				<li><span class="field">throws:</span> <a href="../../phpContentRepository/Exceptions/RepositoryException.html">RepositoryException</a>    If an error occurs.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getVersionLabels
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodgetVersionName" id="getVersionName"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getVersionName</span> (line <span class="line-number">51</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the version name of this version.</p>
<p class="description"><p>This corresponds to the value of the jcr:versionName  <a href="../../phpContentRepository/Property.html">Property</a> in the nt:version <a href="../../phpContentRepository/Node.html">Node</a> that  represents this version.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
				<li><span class="field">throws:</span> <a href="../../phpContentRepository/Exceptions/RepositoryException.html">RepositoryException</a>    If an error occurs.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getVersionName
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodremoveSuccessor" id="removeSuccessor"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">removeSuccessor</span> (line <span class="line-number">202</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Removes $v from the successors of this version.</p>
<p class="description"><p>This method corresponds to removing a reference to an  nt:version <a href="../../phpContentRepository/Node.html">Node</a> from the jcr:successors  multi-value <a href="../../phpContentRepository/Property.html">Property</a> of the nt:version <a href="../../phpContentRepository/Node.html">Node</a>  that represents this version.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
				<li><span class="field">throws:</span> <a href="../../phpContentRepository/Exceptions/VersionException.html">VersionException</a>    If $v is not currently a direct successor of this    <a href="../../phpContentRepository/Node.html">Node</a>.</li>
				<li><span class="field">throws:</span> RepositoryException if an error occurs.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			removeSuccessor
		</span>
					(<span class="var-type">Version</span>&nbsp;<span class="var-name">$v</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">object
 A</span>
				<span class="var-name">$v</span><span class="var-description">: <a href="../../phpContentRepository/Level2/Version.html">Version</a> object.</span>			</li>
				</ul>
		
		
	</div>
<a name="methodremoveVersionLabel" id="removeVersionLabel"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">removeVersionLabel</span> (line <span class="line-number">122</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Removes the specified label from among the labels of this version.</p>
<p class="description"><p>This corresponds to removing a value from the  jcr:versionLabels multi-value <a href="../../phpContentRepository/Property.html">Property</a> in the  nt:version <a href="../../phpContentRepository/Node.html">Node</a> that represents this version.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
				<li><span class="field">throws:</span> <a href="../../phpContentRepository/Exceptions/RepositoryException.html">RepositoryException</a>    If an error occurs.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			removeVersionLabel
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$label</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$label</span><span class="var-description">: A version label</span>			</li>
				</ul>
		
		
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Fri, 31 Dec 2004 10:15:26 -0600 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a>
	</p>
	</div></body>
</html>